#! /usr/bin/env python
# encoding: utf-8
import rospy
from sensor_msgs.msg import Image

import cv2
from cv_bridge import CvBridge


def callback(msg):

    cvBridge = CvBridge()

    cvImg = cvBridge.imgmsg_to_cv2(msg)

    cv2.imshow("window", cvImg)

    cv2.waitKey(3)


def listener():

    rospy.init_node('empty', anonymous=True)

    rospy.Subscriber('/the_node/picture',Image, callback)

    rospy.spin()


if __name__ == '__main__':
    listener()